package com.baizhi.service.serviceImpl;

import com.baizhi.dao.StudentDao;
import com.baizhi.entity.Student;
import com.baizhi.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentDao sd;
    @Override
    public void insert(Student st) {
        sd.insert(st);
    }

    @Override
    public void delete(int id) {
        sd.delete(id);
    }

    @Override
    public void update(Student st) {
       sd.update(st);
    }

    @Override
    public List<Student> showAll() {

        return sd.showAll();
    }

    @Override
    public Student showOne(int id) {
        return sd.showOne(id);
    }
}
